
package ch.raph.test.mvc;

import com.bilat.tools.io.console.Clavier;

import ch.raph.test.mvc.controller.AbstractController;
import ch.raph.test.mvc.model.AbstractModel;
import ch.raph.test.mvc.model.Model;
import ch.raph.test.mvc.view.View;

public class UseMVC
    {
    
    public static void main(String[] args)
        {
        AbstractModel<Double> model = new Model();
        AbstractController<Double> controller = new AbstractController<Double>(model);
        View view = new View(controller);
        model.addObserver(view);
        
        while(true)
            {
            double d = Clavier.lireDouble("insert double : ");
            if(d == 0.0)
                {
                view.c();
                }
            else
                {
                view.click(d);
                }
            }
        
        }
    }
